<div id="page-wrapper">
    <div class="row headline" >
        <div class="col-md-12 headline-title" >
            <h3>学员招生 <img src="assets/img/angle-right.png" alt="" class="tubiao"></h3><h4>一对一合同</h4>
        </div>
    </div>
    <div class="row createbutton" >
        <div class="col-md-1" >
            <button class="search-content" style="background: #4da1ff;color: #fff;	box-shadow: #84bdff 0px 0px 8px;" data-toggle="modal" data-target="#createContract">创建合同</button>
        </div>
        <div class="col-md-2" style="text-align: right" ng-if="admin==true">
            <schoolcampus></schoolcampus>
        </div>
        <div class="col-md-1" ng-if="admin==true">
            <button class="search-content" style="background: #4da1ff;color: #fff;	box-shadow: #84bdff 0px 0px 8px;" ng-click="find()">搜索</button>
        </div>
    </div>
    <div>
        <table class="table ">
            <thead class="yuangong">
            <tr>
                <th>编号</th>
                <th>合同名称</th>
                <th>学员卡号</th>
                <th>学员姓名</th>
                <th>总学费</th>
                <th>实缴学费</th>
                <th>学费欠费</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody class="xuhao">
            <tr ng-repeat="data in datas | filter: card | filter: studentName ">
                <td>{{data.pact_sn}}</td>
                <td>{{data.name}}</td>
                <td>{{data.student_sn}}</td>
                <td>{{data.student_name}}</td>
                <td>{{data.tuition_total}}</td>
                <td>{{data.tuition_reality}}</td>
                <td>{{data.tuition_lack}}</td>
                <td>
                    <span class="operation" data-toggle="modal" ng-click="enrol($index)" ng-if="data.tuition_lack<=0"><i class="iconfont icon-kecheng"></i>报课</span>
                    <span class="operation" data-toggle="modal" ng-click="drop($index)"><i class="iconfont icon-tuike"></i>退课</span>
                    <span class="operation" data-toggle="modal" ng-click="supplementary($index)"><i class="fa fa-cny"></i>补交</span>
                    <a href="#/revise/{{data.id}}" class="operation"><i class="fa fa-edit"></i>修改</a>
                    <a href="#/check/{{data.id}}" class="operation"><i class="fa fa-file-text"></i>查看</a>
                    <a class="operation" href="#/teachingschedule/{{data.id}}/{{data.teach_5a_hour_surplus}}/{{data.teach_8a_hour_surplus}}/{{data.teach_director_hour_surplus}}"><i class="iconfont icon-write"></i>排课</a>
                    <!--<span class="operation fa fa-trash-o" ng-click="delete($index)">删除</span>-->
                </td>
            </tr>
            </tbody>
        </table>
    </div>
    <!--创建合同-->
    <div class="container-fluid text-center">
        <!-- 模态框（Modal） -->
        <div class="modal fade" id="createContract" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
            <div class="modal-dialog" style="width: 1000px;">
                <div class="modal-content" >
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                        <h2 class="modal-title" > <span class="fa fa-edit">创建合同</span></h2>
                    </div>
                    <form >
                        <div class="modal-body">
                            <!-- 提交表单到服务器 -->
                            <table width="100%" align="center">
                                <tbody class="modal-information">
                                <tr class="paikeconter">
                                    <td  height="52">合同名称</td>
                                    <td>学员卡号</td>
                                    <td></td>
                                </tr>
                                <tr class="paikeconter">
                                    <td width="33.3333333%">
                                        <input type="text" class="form-control"  style="background: #fef6f9;border: 1px solid #fce5ee"  ng-model="name">
                                    </td>
                                    <td width="33.3333333%">
                                        <input type="text" class="form-control"  style="background: #fef6f9;border: 1px solid #fce5ee"  ng-model="student_sn">
                                    </td>
                                    <td width="33.3333333%">
                                        <div style="margin:0 auto;" >
                                            <button type="button" class="btn btn-primary" style="float:left" ng-click="detect()">检测卡号</button><div class="form-control"  style="background: #fef6f9;border: 1px solid #fce5ee;float:right;width: 60%;" id="prompting"></div>
                                        </div>
                                    </td>
                                </tr>
                                <tr class="paikeconter">
                                    <td height="52">负责人职务</td>
                                    <td>负责人姓名</td>
                                </tr>
                                <tr class="paikeconter">
                                    <td>
                                        <select class="tankuang" id="presonposition" value="">
                                            <option value=""  disabled selected style="display: none;"></option>
                                            <option value="3">教务</option>
                                            <option value="1">咨询</option>
                                        </select>
                                    </td>
                                    <td>
                                        <select class="tankuang" id="presonname"></select>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="modal-footer">
                            <button type="submit" class="btn btn-primary-tf" ng-click="save()">保存</button>
                        </div>
                    </form>
                </div>
                <!-- /.modal-content -->
            </div>
            <!-- /.modal -->
        </div>
    </div>
    <!--报课单-->
    <div class="container-fluid text-center">
        <!-- 模态框（Modal） -->
        <div class="modal fade" id="dailyCourse" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
            <div class="modal-dialog" style="width: 1000px;">
                <div class="modal-content" >
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                        <h2 class="modal-title" > <span class="fa fa-edit">创建报课单</span></h2>
                    </div>
                    <form >
                        <div class="modal-body">
                            <!-- 提交表单到服务器 -->
                            <table width="100%" align="center">
                                <tbody class="modal-information">
                                <tr>
                                    <td  height="52">报课单编号：</td>
                                    <td>
                                        <input type="text" class="form-control" style="background: #fef6f9;border: 1px solid #fce5ee" ng-model="sn">
                                    </td>
                                    <td  height="52">收据单：</td>
                                    <td>
                                        <input type="text" class="form-control" style="background: #fef6f9;border: 1px solid #fce5ee" ng-model="record_sn">
                                    </td>
                                </tr>
                                <tr>
                                    <td  height="52">教师级别 5A：单价</td>
                                    <td>
                                        <input type="number" class="form-control" style="border: 1px solid #e9eff4" ng-model="teach_5a_price">
                                    </td>
                                    <td>所报小时数：</td>
                                    <td>
                                        <input type="number" class="form-control"  style="background: #eae7ff;border: 1px solid #e7e8ff"  ng-model="teach_5a_hour">
                                    </td>
                                    <td>学费：</td>
                                    <td>
                                        <input type="number" class="form-control" style="border: 1px solid #88c0ff"  value="{{teach_5a_price*teach_5a_hour}}" id="teach_5a_price_total">
                                    </td>
                                </tr>
                                <tr>
                                    <td  height="52">教师级别 8A：单价</td>
                                    <td>
                                        <input type="number" class="form-control"  style="border: 1px solid #e9eff4" ng-model="teach_8a_price" >
                                    </td>
                                    <td>所报小时数：</td>
                                    <td>
                                        <input type="number" class="form-control"  style="background: #eae7ff;border: 1px solid #e7e8ff"  ng-model="teach_8a_hour">
                                    </td>
                                    <td>学费：</td>
                                    <td>
                                        <input type="number" class="form-control" style="border: 1px solid #88c0ff"  value="{{teach_8a_price*teach_8a_hour}}" id="teach_8a_price_total">
                                    </td>
                                </tr>
                                <tr>
                                    <td  height="52">教师级别 总监：单价</td>
                                    <td>
                                        <input type="number" class="form-control" style="border: 1px solid #e9eff4" ng-model="teach_director_price">
                                    </td>
                                    <td>所报小时数：</td>
                                    <td>
                                        <input type="number" class="form-control"  style="background: #eae7ff;border: 1px solid #e7e8ff"  ng-model="teach_director_hour">
                                    </td>
                                    <td>学费：</td>
                                    <td>
                                        <input type="number" class="form-control" style="border: 1px solid #88c0ff"  value="{{teach_director_price*teach_director_hour}}" id="teach_director_price_total" >
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                            <table width="100%">
                                <tbody class="modal-tf">
                                <tr>
                                    <td height="52">缴费方式</td>
                                    <td height="52">实际缴费</td>
                                    <td height="52">总学费</td>
                                    <td height="52">欠费</td>
                                </tr>
                                <tr class="paikeconter">
                                    <td height="52">
                                        <div class="tankuang-tf" style="margin: 0 auto">
                                            <methostyle></methostyle>
                                        </div>
                                    </td>
                                    <td>
                                        <input type="number" class="form-control"  style="background: #fef6f9;border: 1px solid #fce5ee" ng-model="tuition_reality">
                                    </td>
                                    <td>
                                        <input type="text" class="form-control"   style="background: #fef6f9;border: 1px solid #fce5ee" id="tuition_total" ng-model="tuition_total">
                                    </td>
                                    <td>
                                        <input type="number" class="form-control"  style="background: #fef6f9;border: 1px solid #fce5ee" value="{{tuition_total-tuition_reality}}"  id="tuition_lack">
                                    </td>
                                </tr>
                                <tr>
                                    <td height="52">校长</td>
                                    <td height="52">学生/家长</td>
                                </tr>
                                <tr class="paikeconter">
                                    <td>
                                        <input type="text" class="form-control" style="background: #edf5ff;border: 1px solid #f2faff" ng-model="principal">
                                    </td>
                                    <td>
                                        <input type="text" class="form-control" style="background: #edf5ff;border: 1px solid #f2faff" ng-model="parents">
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="modal-footer">
                            <button type="submit" class="btn btn-primary-tf" ng-click="save()">保存</button>
                        </div>
                    </form>
                </div>
                <!-- /.modal-content -->
            </div>
            <!-- /.modal -->
        </div>
    </div>
    <!--退课单-->
    <div class="container-fluid text-center">
        <!-- 模态框（Modal） -->
        <div class="modal fade" id="withdraw" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
            <div class="modal-dialog" style="width: 1278px;">
                <div class="modal-content" >
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                        <h2 class="modal-title" ><span class="fa fa-edit">退课</span></h2>
                    </div>
                    <form >
                        <div class="modal-body">
                            <!-- 提交表单到服务器 -->
                            <table width="100%" align="center">
                                <tbody class="modal-information">
                                <tr>
                                    <td  height="52" style="color: #616870">5A 单价</td>
                                    <td>
                                        <input type="number" class="form-control"  value="300" id="drop5aprice">
                                    </td>
                                    <td style="color: #614fe0">剩余小时数：</td>
                                    <td>
                                        <input type="number" class="form-control" style="background:#eae7ff;border: 1px solid #D4CFF9;" value="{{drop.teach_5a_hour_surplus}}">
                                    </td>
                                    <td  style="color: #8cc3ff">剩余学费：</td>
                                    <td>
                                        <input type="number" class="form-control" style="border: 1px solid #88c0ff;" value="{{300*drop.teach_5a_hour_surplus}}">
                                    </td>
                                    <td style="color: #ef9b3d">预退小时数：</td>
                                    <td>
                                        <input type="number" class="form-control" style="background:#fffae7;border: 1px solid #FDF3CC;"  id="drop_teach_5a_hour_surplus" value="0" max="{{drop.teach_5a_hour_surplus}}">
                                    </td>
                                </tr>
                                <tr>
                                    <td  height="52" style="color: #616870">8A 单价</td>
                                    <td>
                                        <input type="number" class="form-control" value="400" id="drop8aprice">
                                    </td>
                                    <td style="color: #614fe0">剩余小时数：</td>
                                    <td>
                                        <input type="number" class="form-control" style="background:#eae7ff;border: 1px solid #D4CFF9;" value="{{drop.teach_8a_hour_surplus}}">
                                    </td>
                                    <td style="color: #8cc3ff">剩余学费：</td>
                                    <td>
                                        <input type="number" class="form-control" style="border: 1px solid #88c0ff;" value="{{400*drop.teach_8a_hour_surplus}}">
                                    </td>
                                    <td style="color: #ef9b3d">预退小时数：</td>
                                    <td>
                                        <input type="number" class="form-control" style="background:#fffae7;border: 1px solid #FDF3CC;"  value="0" id="drop_teach_8a_hour_surplus" max="{{drop.teach_8a_hour_surplus}}">
                                    </td>
                                </tr>
                                <tr>
                                    <td  height="52" style="color: #616870">总监 单价</td>
                                    <td>
                                        <input type="number" class="form-control" value="600" id="dropdirectorprice">
                                    </td>
                                    <td style="color: #614fe0">剩余小时数：</td>
                                    <td>
                                        <input type="number" class="form-control" style="background:#eae7ff;border: 1px solid #D4CFF9;" value="{{drop.teach_director_hour_surplus}}">
                                    </td>
                                    <td style="color: #8cc3ff">剩余学费：</td>
                                    <td>
                                        <input type="number" class="form-control" style="border: 1px solid #88c0ff;" value="{{600*drop.teach_director_hour_surplus}}">
                                    </td>
                                    <td style="color: #ef9b3d">预退小时数：</td>
                                    <td>
                                        <input type="number" class="form-control" style="background:#fffae7;border: 1px solid #FDF3CC;"  value="0" id="drop_teach_director_hour_surplus" max="{{drop.teach_director_hour_surplus}}">
                                    </td>
                                </tr>
                                <tr>
                                    <td  height="52">校长</td>
                                    <td>
                                        <input type="text" class="form-control"  style="background: #edf5ff;border: 1px solid #f2faff"  ng-model="dropheadmaster">
                                    </td>
                                    <td>学生/家长</td>
                                    <td>
                                        <input type="text" class="form-control"  style="background: #edf5ff;border: 1px solid #f2faff" ng-model="dropparents">
                                    </td>
                                    <td>预退总学费</td>
                                    <td>
                                        <input type="text" class="form-control"  style="background: #fef6f9;border: 1px solid #fce5ee"  ng-focus="focusdrop()" id="droptuition">
                                    </td>
                                    <td>收据单号</td>
                                    <td>
                                        <input type="text" class="form-control"  style="background: #fef6f9;border: 1px solid #fce5ee"  ng-focus="focusdrop()" id="record_sn">
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-primary-tf" ng-click="dropsave()">保存</button>
                        </div>
                    </form>
                </div>
                <!-- /.modal-content -->
            </div>
            <!-- /.modal -->
        </div>
    </div>
    <!--补交-->
    <div class="container-fluid text-center">
        <!-- 模态框（Modal） -->
        <div class="modal fade" id="pay" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
            <div class="modal-dialog" style="width: 1000px;">
                <div class="modal-content" >
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                        <h2 class="modal-title" > <span class="fa fa-edit">补交</span></h2>
                    </div>
                    <form>
                        <div class="modal-body">
                            <!-- 提交表单到服务器 -->
                            <table width="100%" align="center">
                                <tbody class="modal-information">
                                <tr>
                                    <td  height="52">应缴学费</td>
                                    <td>实缴学费</td>
                                    <td>学费欠费</td>
                                </tr>
                                <tr class="paikeconter">
                                    <td height="52">
                                        <input type="text" class="form-control" style="background: #fef6f9;border: 1px solid #fce5ee" value="{{prod.tuition_total}}" id="prodtuition_total">
                                    </td>
                                    <td>
                                        <input type="text" class="form-control" style="background: #fef6f9;border: 1px solid #fce5ee" value="{{prod.tuition_reality}}" id="prodtuition_reality">
                                    </td>
                                    <td>
                                        <input type="text" class="form-control" style="background: #fef6f9;border: 1px solid #fce5ee" value="{{prod.tuition_lack}}" id="prodtuition_lack">
                                    </td>
                                </tr>
                                <tr>
                                    <td  height="52">本次补缴</td>
                                    <td>缴费方式：</td>
                                    <td>收据单号</td>
                                </tr>
                                <tr class="paikeconter">
                                    <td>
                                        <input type="text" class="form-control" style="background: #edf5ff;border: 1px solid #f2faff" ng-model="nowsupplementary">
                                    </td>
                                    <td>
                                        <div style="margin: 0 auto;width: 186px;"><methodstyle></methodstyle></div>
                                    </td>
                                    <td>
                                        <input type="text" class="form-control" style="background: #edf5ff;border: 1px solid #f2faff" ng-model="prodtuition_record_sn">
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="modal-footer">
                            <button type="submit" class="btn btn-primary-tf" ng-click="increase()">申请</button>
                        </div>
                    </form>
                </div>
                <!-- /.modal-content -->
            </div>
            <!-- /.modal -->
        </div>
    </div>
    <div class="row form-inline">
        <div ng-if="myPage.totalItems" my-pagination pg="myPage"></div>
    </div>

</div>
<!-- /. PAGE INNER  -->

